export const STORAGE_KEY = 'user_auth_xxxxxxxxxxxx'
export function checkAuth ()
{
    var auth = JSON.parse(localStorage.getItem(STORAGE_KEY))
    return auth && Object.keys(auth).length
}
export function checkAuth1 ()
{
    var auth = JSON.parse(localStorage.getItem(STORAGE_KEY))
    if(auth && auth.time){
        var preTime = new Date(auth.time)
        var nowTime = new Date().setHours(-1)
        if(nowTime > preTime) {
            return false;
        }
        return auth && Object.keys(auth).length
    } else {
        return false;
    }
}
